/*
 * Project: Sudoku Explainer
 * Copyright (C) 2006-2007 Nicolas Juillerat
 * 
 * Project: Sudoku Hint Engine for Android
 * Copyright (C) 2010-2013 Emanuel Moecklin
 * 
 * Available under the terms of the Lesser General Public License (LGPL)
 */
package com.onegravity.sudoku.solver.rules.uniqueness;

import java.util.BitSet;
import java.util.Map;

import android.net.Uri;

import com.onegravity.sudoku.solver.HintResource;
import com.onegravity.sudoku.solver.HintType;
import com.onegravity.sudoku.solver.core.IndirectHint;
import com.onegravity.sudoku.solver.core.Rule;
import com.onegravity.sudoku.solver.data.Cell;

public abstract class BugHint extends IndirectHint implements Rule {

	private static final long serialVersionUID = -7011483324922898070L;

	public BugHint(Map<Cell, BitSet> removablePotentials) {
        super(removablePotentials);
    }

    @Override
    public String getName() {
    	return getResource().getName(getType()) + getAppendixName();
    }

    @Override
    public Uri getLink() {
    	return getResource().getUrl();
	}

    @Override
    public String toString() {
        return getName() + ": " + getAppendixString(); //$NON-NLS-1$
    }

    protected abstract HintResource getResource();

    protected abstract int getType();

    protected String getAppendixName() {
    	return ""; //$NON-NLS-1$
    }

    protected String getAppendixString() {
    	return ""; //$NON-NLS-1$
    }

    @Override
    public Map<Cell, BitSet> getSelectedPotentials(HintType hintType, int viewNum) {
        return null;
    }

}